<script type="text/javascript" src="/js/boxy/js/jquery.boxy.js"></script>
<link href="/js/boxy/css/boxy.css" media="screen" rel="stylesheet" type="text/css" >  
<script type="text/javascript">
    $(function(){
        window.alert = Boxy.alert;
    });
</script>
  
<div class="admin_nrtop">
        <div class="yundantopleft">
            <div class="yundancz">
                <div class="nui-toolbar-item">
                    <div class="nui-btn ">
                        <a href="<?= $this->referer ?>" class="nui-btn-text"><span>&lt;&lt;</span>返回</a>
                    </div>
                </div>                    
                <div class="nui-toolbar-item">
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id='splitOrder' class="nui-btn-text">拆分</a>
                    </div>
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id="subOrder" class="nui-btn-text">订单预定</a>
                    </div>
                    <div class="nui-btn" id="editupdete">
                        <a href="javascript:void(0)" class="nui-btn-text rxl" id="editStatus">修改状态<i></i></a>
                        <div class="ztlist" style="display:none;">
                            <ul>
                                <?php foreach ($this->statusAll as $key => $statusVal) { ?>
                                    <li><a href="javascript:editInterior(<?php echo $key; ?>,'<?php echo $statusVal; ?>')"><?php echo $statusVal; ?></a></li>
                                <?php }?>
                            </ul>
                        </div>
                    </div>
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id='isProblem' class="nui-btn-text">设置问题</a>
                    </div>
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id='getLogistics' class="nui-btn-text">获取物流</a>
                    </div>
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id='orderTrack' class="nui-btn-text">订单跟踪</a>
                    </div>
                    <div class="nui-btn ">
                        <a href="javascript:void(0)" id="cancel" class="nui-btn-text">取消</a>
                    </div>
                </div>         
            </div>
        </div>
        <div class="yundantopright">
            <p>用户ID：<?php echo $this->order->UserId; ?><input type="hidden" id="allOrderId" name="allOrderId" value="<?php echo $this->order->Id?>" /></p>
        </div>
        <div class="buzhou" style="clear:both">
            <div class="bzbox">
                <table>
                    <tr>
                        <?php
                        $interiorall = $this->order->StatusCorrect;
                        foreach ($interiorall as $key => $interiorval) {
                            $orderLog = Application_Model_Tracking::getOneByObjectTypeIdOperateType(Application_Model_DomainobjectType::ObjectType_Order, $this->order->Id, $key)
                            ?>
                            <td <?php echo $orderLog ? 'class="bz_wanl"' : ""; ?>>
                                <div class="bzloading">
                                    <div class="dian"><?php echo ($orderLog ? '<a href="javascript:void(0)"><i></i><span>'.$interiorval[1] : '<i></i><span>'.$interiorval[0]).'</span></a>'; ?></div>
                                    <?php if ($orderLog) { ?>
                                        <div class="bzxiangbox" style="display: none;">
                                            <div class="xjiantou"></div>
                                            <div class="xianginfo">
                                                <ul>
                                                    <li><label>处理时间：</label><em><?php echo $orderLog->dateAdd; ?></em></li>
                                                    <li><label>责任人：</label><em><?php echo $orderLog->operator; ?></em></li>
                                                </ul>
                                            </div>
                                        </div>
                                    <?php } ?>
                                </div>
                            </td>
                        <?php } ?>
                            <td <?php echo $this->order->status == Application_Model_Order::STATUS_INSTORE ? 'class="bz_wanr"' : ""; ?>></td>
                    </tr>
                </table>
            </div>
            <div class="bzxiang"></div>
        </div>
    </div>    
    <div class="yundan_top">
        <table class="yunxinxi">
            <tr>
                <td class="ydleft">
                    <div class="zhuangtai">
                        <i></i><h1><?php echo $this->order->StatusNames;?>
                    </div>
                    <div class="shouli">
                        <?php if($this->order->Status == Application_Model_Order::STATUS_PAID){ ?>
                            <a class="anvbotton5" href="javascript:void(0)" id="hear"><span>受理</span></a>
                        <?php }?>
                    </div>
                </td>
                <td class="ydtopline">
                    <div class="zhtailan">
                        <label>状态栏：</label>
                        <div class="ydtishi">

                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="ydleft">
                    <table>
                        <tr>
                            <td class="xleft">订单编号：</td>
                            <td class="xlright"><?php echo $this->order->OrderNum;?></td>
                            <td class="xleft">代购标识：</td>
                            <td class="xlright"><?php echo "D".Uuch_Util::base10to33(substr($this->order->DatePaid,-1,2).$this->order->Id);?></td>
                        </tr>
                        <tr>
                            <td class="xleft">用户昵称：</td>
                            <td class="xlright"><?php echo $this->order->User->Nikename; ?></td>
                            <td class="xleft">仓库号：</td>
                            <td class="xlright"><a href="/admini/manageuser/userdetail/id/<?php echo $this->order->UserId; ?>" target="_blank" class="indexa"><?php echo $this->order->User->Storeno; ?></a></td>
                        </tr>
                        <tr>
                            <td class="xleft">购买帐号：</td>
                            <td class="xlright"><?php echo $this->order->procureNo?($this->order->TaoBao?$this->order->TaoBao->taobaoname:"非淘宝订单"):"暂无"; ?></td>
                            <td class="xleft"></td>
                            <td class="xlright"></td>
                        </tr>
                        <tr>
                            <td class="xleft"></td>
                            <td class="xlright"></td>
                            <td class="xleft"></td>
                            <td class="xlright"></td>
                        </tr>
                    </table>
                </td>
                <td class="ydtopline sdq" rowspan="2">
                    <table class="yddizhi">
                        <tr>
                            <td class="dzl" style="width:100px;">最后更新时间：</td>
                            <td><?php echo $this->order->dateConfrim; ?></td>
                        </tr>
                        <tr>
                            <td class="dzl">预定发货时间：</td>
                            <td><?php echo $this->order->DateShip?$this->order->DateShip:"暂无";?></td>
                        </tr>
                        <tr>
                            <td class="dzl">付款时间：</td>
                            <td><?php echo $this->order->datePaid; ?></td>
                        </tr>
                        <tr>
                            <td class="dzl">提交时间：</td>
                            <td><?php echo $this->order->dateCreated; ?></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="ydbottom">
        <?php if($this->order->comment){ ?>
            <div class="youqiliuyan">
                <div class="lanmu">
                    <h2>运单内部备注</h2>
                </div>
                <div class="yqly">
                    <?php echo $this->order->comment;?>
                </div>
            </div>
        <?php }?>
        <?php if($this->order->user->remark){ ?>
            <div class="youqiliuyan">
                <div class="lanmu">
                    <h2>用户备注</h2>
                </div>
                <div class="yqly">
                    <?php echo "<p><b>用户备注：</b>".$this->order->user->remark."</p>";?>
                </div>
            </div>
        <?php }?>
    </div>
    <div class="wupintable" style="width: 1700px;margin: 5px 25px;">
        <div class="biaotbody">
            <table>
                <tr>
                    <th class="li305"><div class="lileft">&nbsp;</div></th>
                    <th class="li35"><div class="lileft">物品信息</div></th>
                    <th class="li9"><div class="lileft">单价</div></th>
                    <th class="li9"><div class="lileft">数量</div></th>
                    <th class="li9"><div class="lijz">总价</div></th>
                </tr>
            </table>
        </div>
        <div class="table">
            <table>
                <?php $index = 2; $shipUrl = "";
                    echo "<tr id='tr_" . $this->order->Id . "_1'>";
                    if($this->order->shipdetail){
                        foreach ($this->order->shipdetail as $key => $val) {
                            if (count($this->order->shipdetail) > 1) {
                                if ($key > 0) {
                                    echo "<tr id='tr_" . $this->order->Id . "_$index'>";
                                    $index+=1;
                                }
                            }
                            $productd = $val->byproductd;
                            if ($key == 0){
                                $shipUrl = $productd->url;
                            }
                            $image = $productd->image ? $productd->image : $productd->remoteImage;
                            $arrimage = explode('"', $image);
                            if(count($arrimage)>1){
                                $imgUrl = $arrimage[1];
                            } else {
                                $imgUrl = $image;
                            }
                    ?>
                                <td class="li305">
                                    <div class="lileft bianhao">
                                        <?php if($this->order->Status == Application_Model_Order::STATUS_CONFRIM  && $this->order->Isdelete != 1){?>
                                            <div style="float:left;font-size: 16px;margin-right: 10px;margin-top: 10px;">
                                                <input name="SplitCheck" type="checkbox" id="SplitCheck<?php echo $val->Id;?>" value="<?php echo $val->Id;?>" class="<?php echo $this->order->Id;?>" <?php if(!(count($this->order->shipdetail) > 1) || $val->Status == 1){echo "disabled='true'"; }?>/>
                                                <span style="margin-left:5px;"><?php echo $key+1;?></span>
                                            </div>
                                        <?php } ?>
                                    </div>
                                </td>
                                <td class="li35">
                                    <?php if ($this->order->status != Application_Model_Order::STATUS_PAYING && $this->order->status != Application_Model_Order::STATUS_PAID && $this->order->status != Application_Model_Order::STATUS_CANCEL) { ?>
                                        <?php if($this->order->status == Application_Model_Order::STATUS_CONFRIM && $this->order->operator != Uuch_Util::getUserNikeName()){?>
                                            <div style="float:left;width: 55px;">
                                                <img src="<?php echo $imgUrl; ?>" width="50px" height="50px" style="vertical-align:middle;"/>
                                            </div>
                                            <div style="float:left;width: 90%;">&nbsp;&nbsp;<?php echo $val->productName; ?></div>
                                            <div style="float:left;color:#666;width: 90%;">&nbsp;&nbsp;<?php echo $productd->PropertyAlias; ?></div>
                                        <?php } else { ?>
                                            <div style="float:left;width: 55px;">
                                                <a href="<?php echo $val->taoBaoUrl?$val->taoBaoUrl:$productd->url; ?>" target="_blank">
                                                    <img src="<?php echo $imgUrl; ?>" width="50px" height="50px" style="vertical-align:middle;"/>
                                                </a>
                                            </div>
                                            <div style="float:left;width: 90%;">
                                                &nbsp;&nbsp;<a href="<?php echo $val->taoBaoUrl?$val->taoBaoUrl:$productd->url; ?>" target="_blank" class="indexa"><?php echo $val->productName; ?></a>
                                            </div>
                                            <div style="float:left;color:#666;width: 90%;">&nbsp;&nbsp;<a href="<?php echo $productd->url ?>" target="_blank"><?php echo $productd->PropertyAlias; ?></a></div>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <div style="float:left;width: 55px;">
                                            <img src="<?php echo $imgUrl; ?>" width="50px" height="50px" style="vertical-align:middle;"/>
                                        </div>
                                        <div style="float:left;width: 90%;">&nbsp;&nbsp;<?php echo $val->productName; ?></div>
                                        <div style="float:left;color:#666;width: 90%;">&nbsp;&nbsp;<?php echo $productd->PropertyAlias; ?></div>
                                    <?php } ?>
                                    <div style="float:left;color:#666;width: 90%;padding-left: 8px;">商品备注：<?php echo $val->comment ? $val->comment : "(无)"; ?></div>
                                    <div style="float:left;color:#c00;width: 90%;margin-left: 50px;padding-left: 8px;" id="itemDescription<?php echo $val->id; ?>"><?php echo $val->description ? $val->description : ""; ?></div>
                                </td>
                                <td class="li9">
                                    <div class="lileft">
                                    <?php echo $val->price; ?>
                                    <?php
                                        if ($val->status != 1) {
                                            if ($this->order->status != Application_Model_Order::STATUS_CANCEL && $this->order->status != Application_Model_Order::STATUS_INSTORE && $this->order->status != Application_Model_Order::STATUS_PAYING && $this->order->status != Application_Model_Order::STATUS_PAID) {
                                                if( $this->order->status == Application_Model_Order::STATUS_CONFRIM && $this->order->operator == Uuch_Util::getUserNikeName()){
                                                ?>
                                                <a href="javascript:SingleRetuenMoney(<?php echo $val->id; ?>,<?php echo $this->order->userId; ?>,<?php echo $val->price; ?>,<?php echo $val->quantity; ?>);"  class="indexa">
                                                    <div id="SingleRetuenMoney<?php echo $val->id; ?>">单项退款</div></a>
                                                <?php } else if( $this->order->status != Application_Model_Order::STATUS_CONFRIM) { ?>
                                                <a href="javascript:SingleRetuenMoney(<?php echo $val->id; ?>,<?php echo $this->order->userId; ?>,<?php echo $val->price; ?>,<?php echo $val->quantity; ?>);"  class="indexa">
                                                    <div id="SingleRetuenMoney<?php echo $val->id; ?>">单项退款</div></a>
                                            <?php } }
                                        } else {
                                            ?>
                                            <div><font color="green">已退款</font></div>
                                            <?php
                                        }
                                        ?>
                                    </div>
                                </td>                                
                                <td class="li9">
                                    <div class="lileft"><?php echo $val->quantity; ?></div>
                                </td>   
                                <?php if ($key == 0) { ?>
                                    <td class="li9" rowspan="<?php echo count($this->order->shipdetail); ?>" style="border-left: #d4dae2 solid 1px;">
                                        <div class="lijz">
                                        ￥<?php echo $this->order->sum; ?> 
                                        <?php if ((int) ($this->order->shipFee) > 0) { echo "<br><font color='grey'>含运费：" . $this->order->shipFee . "</font>"; } ?>
                                        </div>
                                    </td>
                                <?php } ?>  
                    <?php } }?>
            </table>
        </div>    
    </div>
    <div class="ydbottom">
        <?php if($this->order->status >= Application_Model_Order::STATUS_CONFRIM){ ?>
            <div class="chuku">
                <div class="lanmu">
                    <h2>订单流程</h2>
                </div>
                <?php if($this->order->status == Application_Model_Order::STATUS_CONFRIM ){ ?>
                    <div class="lcbox">
                        <table class="lcks" >
                            <tr>
                                <td class="lcleft"><p>待下单</p></td>
                                <td>
                                    <div class="qudao">
                                        <dl>
                                            <dt>订单号：</dt>
                                            <dd>
                                                <input type="textbox" id="procureNo" name="procureNo" value="" />
                                            </dd>
                                        </dl>
                                        <div class="lctijiao">
                                            <a class="anvbotton5" href="javascript:void(0)" id="setProcure"><span>确认</span></a>
                                        </div>
                                    </div> 
                                </td>
                            </tr>
                        </table>
                    </div>
                <?php }?>
                <?php if($this->order->Status >= Application_Model_Order::STATUS_UNSEND){?>
                    <div class="lcbox">
                        <table class="lcwc">
                            <tr>
                                <td class="lcleft">
                                    <p class="yixz"><i></i>已下单</p>
                                </td>
                                <td>
                                    <div class="qudao">
                                        <dl>
                                            <dt>订单号：</dt>
                                            <dd><?php echo $this->order->ProcureNo; ?></dd>
                                        </dl>
                                    </div>
                                </td>
                            </tr> 
                        </table>
                    </div>
                <?php }?>
                <?php if($this->order->Status == Application_Model_Order::STATUS_UNSEND ){?>
                    <div class="lcbox">
                        <table class="lcwc">
                            <tr>
                                <td class="lcleft"><p>待卖家发货</p></td>
                                <td>
                                    <div class="qudao">
                                        <dl>
                                            <dt>物流信息：</dt>
                                            <dd>
                                                <select name="logistics" id="logistics">
                                                    <?php foreach ($this->expresscomp as $expresscomp) { ?>
                                                            <option value="<?php echo $expresscomp->id; ?>"><?php echo $expresscomp->word . '_' . $expresscomp->name; ?></option>
                                                    <?php } ?>
                                                </select>
                                                <input type="text" id="logisticsNo" name="logisticsNo" value="" />
                                            </dd>
                                        </dl>
                                        <div class="lctijiao">
                                            <a class="anvbotton5" href="javascript:void(0)" id="setLogistics"><span>确认</span></a>
                                        </div>
                                    </div> 
                                </td>
                            </tr>
                        </table>
                    </div>
                <?php }?>
                <?php if($this->order->Status >= Application_Model_Order::STATUS_SELLER_SENDED){?>
                    <div class="lcbox">
                        <table class="lcwc">
                            <tr>
                                <td class="lcleft">
                                    <p class="yixz"><i></i>卖家已发货</p>
                                </td>
                                <td>
                                    <div class="qudao">
                                        <dl>
                                            <dt>物流信息：</dt>
                                            <dd><?php echo "[".$this->order->LogisticsBy->Name."]".$this->order->LogisticsNo;?></dd>
                                        </dl>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                <?php }?>
                <?php if($this->order->Status == Application_Model_Order::STATUS_SELLER_SENDED ){?>
                    <div class="lcbox">
                        <table class="lcks" >
                            <tr>
                                <td class="lcleft"><p>待入库</p></td>
                                <td>
                                    <div class="qudao">
                                        <div class="lctijiao">
                                            <a class="anvbotton5" href="javascript:void(0)" id="setInStore"><span>设置已入库</span></a>
                                        </div>
                                    </div> 
                                </td>
                            </tr>
                        </table>
                    </div>
                <?php }?>
                <?php if($this->order->Status >= Application_Model_Order::STATUS_INSTORE){?>
                    <div class="lcbox">
                        <table class="lcwc">
                            <tr>
                                <td class="lcleft">
                                    <p class="yixz"><i></i>已入库</p>
                                </td>
                                <td>
                                    <div class="qudao">
                                        <?php foreach($this->order->StoreBylogistics as $storeVal){ ?>
                                        <dl>
                                            <dt>商品仓库编号：</dt>
                                            <dd><?php echo $storeVal->Barcode;?></dd>
                                        </dl>
                                        <?php } ?>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                <?php }?>
            </div>
        <?php }?>
    </div>     
    <div class="yundan_top">
        <table class="yunxinxi">
            <tr>
                <td class="ydleft">
                    <div class="zhtailan">
                        <label>操作日志：</label>
                    </div>
                </td>
                <td class="ydtopline">
                    <div class="zhtailan">
                        <label>物流跟踪：</label>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="ydleft">
                    <div class="wupintable operatortrack" style="width: 730px;height: 400px;overflow: auto;">
                        <div class="biaotbody">
                            <table>
                                <tr>
                                    <th class="li15"><div class="lileft">时间</div></th>
                                    <th class="li15"><div class="lileft">操作人</div></th>
                                    <th class="li35"><div class="lileft">操作描述</div></th>
                                    <th class="li9"><div class="lileft">用户是否可见</div></th>
                                </tr>
                            </table>
                        </div>
                        <div class="table operatortrackcontent">
                            <?php if($this->tracklog){ ?>
                                <table>
                                    <tbody>
                                        <?php  foreach ($this->tracklog as $vallog) { ?>
                                            <tr>
                                                <td class='li15' style='font-size:12px;'>
                                                    <div class='lileft bianhao'><?php echo $vallog->dateAdd;?></div>
                                                </td>
                                                <td class='li15' style='font-size:12px;'>
                                                    <div class='lileft bianhao'><?php echo $vallog->operator;?></div>
                                                </td>
                                                <td class='li35' style='font-size:12px;'>
                                                    <div class='lileft bianhao'><?php echo $vallog->content;?></div>
                                                </td>
                                                <td class='li9' style='font-size:12px;'>
                                                    <div class='lileft bianhao'><?php echo $vallog->IsUser;?></div>
                                                </td>
                                            </tr>
                                        <?php } ?>
                                    </tbody>
                                </table>
                            <?php } else { echo "暂无操作"; } ?>
                        </div>    
                    </div>
                </td>
                <td class="ydtopline sdq" rowspan="2">
                    <div class="wupintable niumentrack" style="width: 900px;height: 400px;overflow: auto;">
                        <div class="biaotbody">
                            <table>
                                <tr>
                                    <th class="li9"><div class="lileft">时间</div></th>
                                    <th class="li15"><div class="lileft">位置</div></th>
                                    <th class="li35"><div class="lileft">描述</div></th>
                                </tr>
                            </table>
                        </div>
                        <div class="table niumentrackcontent">
                            <?php if($this->order->logisticsNo != ""){ ?>
                                物流状态加载中...
                                <script type="text/javascript">
                                    $(function(){
                                        $.post('/admini/managebuyshop/getingexpress', {'id':<?= $this->order->Id ?>}, function(data){
                                            if(data.content){
                                                var html = "<table><tbody>";
                                                $.each(data.content,function(key,val){
                                                    html += "<tr><td class='li9' style='font-size:12px;'><div class='lileft bianhao'>"+val.DATETIME+"</div></td>";
                                                    html += "<td class='li15' style='font-size:12px;'><div class='lileft bianhao'>"+val.PLACE+"</div></td>";
                                                    html += "<td class='li35' style='font-size:12px;'><div class='lileft bianhao'>"+val.INFO+"</div></td></tr>";
                                                });
                                                html += "</tbody></table>";

                                                $(".niumentrackcontent").html(html);
                                                $(".niumentrack").show();
                                                $(".mingxi").hide();
                                            } else {
                                                $(".mingxi").text("无法获取物流信息 ");
                                            }
                                        }, 'json');
                                    })
                                </script>
                            <?php } else {
                                echo "暂无数据";
                            } ?>
                        </div>    
                    </div>
                </td>
            </tr>
        </table>
    </div>

<div class="tanchuang" style="display:none;">
    <div class="nui-msgbox">
        <div class="nui-msgbox-hd" id="wayProblem">问题包裹</div>
        <div class="nui-msgbox-hd" id="uuchInterior" style="display:none;">悠奇内部备注</div>
        <div class="nui-msgbox-hd" id="shangyibag" style="display:none;">包裹属性</div>
        <a class="nui-msgbox-close" title="关闭"><b></b></a>
    </div>
    <div class="wt_top">
    	<div class="wt_nav">
            <ul>
            	<li class="wt_on"><a href="javascript:void(0)" id="problem">问题沟通</a></li>
            	<li ><a href="javascript:void(0)" id="dispose">处理与进度</a></li>
            </ul>
        </div>
    </div>
    <div class="wenti_box" id="problemComm">
        <div class="wt_center" style="height:300px;">
            <?php 
                if($this->issuedetail){
                    foreach($this->issuedetail as $problemVal){ ?>
                    <div class="<?php echo $problemVal->issuetype == 1?"wt_uuch":"wt_kehu"; ?>">
                        <h2><?php echo $problemVal->issuetype == 1?"悠奇客服":'回复人：<a href="/admini/manageuser/userdetail/id/'.$this->order->userId.'" target="_blank">'.$this->order->user->nikename.'</a>'; ?>
                            <span><?php echo $problemVal->dateCreated;?></span></h2>
                        <p><?php echo htmlspecialchars($problemVal->content);?></p>
                    </div>
            <?php } } ?>
        </div>
        <form method="post" action="/admini/managewaybill/affirmproblem/id/<?php echo $this->order->id; ?>?_rf=<?= urlencode($this->referer) ?>" id="formproblem">
            <div style="margin-left:20px;margin-top: -5px;margin-bottom: 5px;">
                留言类型：<input type="radio" id="isProblem0" name="isProblem" value="0" <?php echo count($this->issuedetail)>0?"checked":"";?>>旧问题补充&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="radio" id="isProblem1" name="isProblem" value="1" <?php echo count($this->issuedetail)>0?"":"checked";?>>新问题
            </div>
            <div class="wt_caozuo">
                <textarea name="content" cols="" rows="" id="content"></textarea><a class="wt_liuyan" href="javascript:$('#formproblem').submit();"><span>留言</span></a>
            </div>
        </form>
    </div>
    <div class="wenti_box" id="interiorRemark" style="display:none;padding-top: 20px;">
        
        <form method="post" action="/admini/managewaybill/addinteriorremark/id/<?php echo $this->order->id; ?>?_rf=<?= urlencode($this->referer) ?>" id="formremark">
            <div class="wt_caozuo">
                <textarea name="interiorcontent" cols="" rows="" id="interiorcontent"></textarea><a class="wt_liuyan" href="javascript:$('#formremark').submit();"><span>留言</span></a>
            </div>
        </form>
    </div>
    <div class="wenti_box" id="addsyProperty" style="display:none;padding-top: 20px;">
        <div class="wt_caozuo">
            <textarea name="syproperty" cols="" rows="" id="syproperty"><?php echo $shangyiLog?$shangyiLog->description:"";?></textarea><a class="wt_liuyan" href="javascript:addSyProperty();"><span>添加</span></a>
        </div>
    </div>
    <div class="wenti_box2"  style="display:none;">
        <form method="post" action="/admini/managewaybill/affirmschedule/id/<?php echo $this->order->id; ?>?_rf=<?= urlencode($this->referer) ?>" id="formschedule">
            <div class="wttj">
                <input class="textinput w140" type="text" value="<?php echo date("Y-m-d H:i:s");?>" id='crdate' name='crdate'/>
                <input class="textinput w300" type="text" id='schedule' name='schedule' /><a class="anvbotton5" href="javascript:void(0)" id='affirmjindu'><span>确认</span></a>
            </div>
        </form>
	<div class="wenti_jindu">
            <table>
                <?php 
                if($this->scheduledetail){
                    foreach($this->scheduledetail as $key => $operateVal){ ?>
                    <tr <?php echo $key==0?'class="jd_on"':"";?>>
                        <td class="wtjd_z"><p><?php echo $operateVal->dateCreated;?><i></i></p></td>
                        <td><?php echo $operateVal->content;?></td>
                    </tr>
                <?php } }?>
            </table>
        </div>
        <div class="wenticaoz">
            <?php if($this->problemWay->status != ""){
                if($this->problemWay->status != Application_Model_ProblemWay::Problem_StayUser && $this->problemWay->status != Application_Model_ProblemWay::Problem_StayUuch ){ ?>
            <p>该问题运单已选择<?php echo $this->problemWay->StatusName;?>！<a href="javascript:void(0)" id='CancelReturn'>取消</a></p>
            <?php } else {?>
            <ul>
            	<li><a class="anvbotton6" id='ReturnCancel'><span>退件</span></a></li>
            	<li><a class="anvbotton6" id='PartReturn'><span>部分退回</span></a></li>
            	<li><a class="anvbotton6" id='achieveProblem'><span>设为正常</span></a></li>
            </ul>
            <?php } } ?>
        </div>
    </div>
</div>
<div class="houtai_overlay" style="display:none;"></div>
<script>
    $(".dian").mouseenter(function(){
       $(this).next("div").show();
    });
    $(".bzloading").mouseleave(function(){
        $(".bzloading .bzxiangbox").hide();
    });
    <?php if($this->order->Status == Application_Model_Order::STATUS_PAID){ ?>
        $('#hear').live("click",function(){
            var id = $("#allOrderId").val();
            $.ajax({
                type: 'POST',
                url: '/admini/managebuyshop/setconfrim/id/' + id,
                success: function(data) {
                    if(data == 1){
                        alert("受理成功");
                    }else{
                        alert("发生未知错误。")
                    }
                    location.reload();
                }
            });
            return false;
        });
    <?php }?>
</script>
